package com.fit.pianosheetshop.pages;

import java.util.Date;
import java.util.LinkedList;


import com.fit.pianosheetshop.interfaces.*;
import com.fit.pianosheetshop.service.Sheets;
import com.fit.pianosheetshop.beans.*;

import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.Inject;




public class EntrySheet {	
	@Property
	@Persist
	private Sheet sheet;

	@Inject
	private Sheets sheets;

	@SetupRender
	public void createObject() {
		sheet = new SheetBean();
		sheet.setBorrow(new LinkedList<Borrow>());
	}

	void onSuccess() {
		sheets.save(sheet);
}
}